package com.express.service.impl;

import com.express.core.mapper.TestMapper;
import com.express.entity.Test;
import com.express.service.ITestService;
import com.express.service.SuperClass;
import org.springframework.aop.framework.AopContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("testServiceImpl")
//@EnableAspectJAutoProxy(exposeProxy = true)
public class TestServiceImpl extends SuperClass implements ITestService {

    @Autowired
    TestMapper mapper;

    @Override
    public int save(Test test) {
        return mapper.save(test);
    }

    @Override
    public List<Test> query() {
        return mapper.query();
    }

    @Override
    public int delete(Test test) {
        return mapper.delete(test);
    }

    @Override
    public void sayHi() {
        System.out.println("one to say hi");
//        super.doPost();
//        ((SuperClass)AopContext.currentProxy()).doPost();
    }
}
